From 9bff7e28c68ba25c7103a2f9f3646fb55c4206bd Mon Sep 17 00:00:00 2001 From: Ewan Mellor Date: Fri, 5 Jan 2007 16:11:49 +0000 Subject: [PATCH] Catch exception from dumpCore when inside refreshShutdown. Thanks to John Levon for diagnosis and suggesting the fix. Signed-off-by: Ewan Mellor --- tools/python/xen/xend/XendDomainInfo.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tools/python/xen/xend/XendDomainInfo.py b/tools/python/xen/xend/XendDomainInfo.py index b47083a885..3a2fa3ef4f 100644 --- a/tools/python/xen/xend/XendDomainInfo.py +++ b/tools/python/xen/xend/XendDomainInfo.py @@ -972,7 +972,12 @@ class XendDomainInfo: self._writeVm(LAST_SHUTDOWN_REASON, 'crash') if xroot.get_enable_dump(): - self.dumpCore() + try: + self.dumpCore() + except XendError: + # This error has been logged -- there's nothing more + # we can do in this context. + pass restart_reason = 'crash' self._stateSet(DOM_STATE_HALTED) @@ -1164,7 +1169,10 @@ class XendDomainInfo: # def dumpCore(self, corefile = None): - """Create a core dump for this domain. Nothrow guarantee.""" + """Create a core dump for this domain. + + @raise: XendError if core dumping failed. + """ try: if not corefile: -- 2.30.2